2.5 Types of Objects

The type of the Object is set by the parameters of its constructor. There are two parameters that control the type of the Object. First is called simply type and can assume the next three values:

* FIXED - the Object of this type is fixed on the screen and its behavior resembles that of a real object on the instrument's panel. It cannot be removed, dragged and always is on the screen. Use that kind of Objects for displaying the most important data on the screen that you need to see all the time. FIXED Objects must not appear inside the Dragging area because they are not repainted by Virtual Panels core when the Dragging area is corrupted.

* PERM - is permanently seen on the screen, the overlapping type of Objects. It can be moved inside the Dragging area or even removed from the screen. PERM Object can appear only inside the Dragging area. Otherwise the screen outside the Dragging area may be corrupted. PERM Objects are useful for displaying information that is not necessarily to be always on the screen. You can remove it when it is not in need and then recover it in the same place when you need it. You can move it to the convenient place in the Dragging area at any moment.

* POPUP - this type is similar to PERM type. The main difference is that Virtual Panels saves the underlying image when painting the POPUP Object and restores that image after removing the POPUP Object. On the one hand this consumes the memory, but on the other hand doesn't corrupt the screen and the POPUP Object unlike the PERM Object may reside anywhere on the screen. But nevertheless you can drag POPUP Object only towards or inside the Dragging area. This type is useful when you want only to have a peek at the information displayed by Object. It is useful for displaying messages, input boxes or organizing the ancillary panel with its own button system. This allows you to avoid unnecessary cluttering of the screen with Objects and buttons.

The second parameter is called a frame and takes two values:

* UNFRAMED - when you set this value the Object has no frame around the display, though the title and other visual attributes remain.

* FRAMED - is default value and has an opposite effect.

The reason of defining Objects as UNFRAMED is rather esthetic. The FIXED Objects on the panels, e.g. Indicators, look more attractive without frames. In any case it is your choice to define Object with a frame or without it. If you don't define Object UNFRAMED during declaration it is FRAMED by default.